package com.esteel.settlement.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;


/**
 * The persistent class for the TB_SETT_FUND_CHG database table.
 * 
 */
@Entity
@Table(name="TB_SETT_FUND_CHG")
@NamedQuery(name="TbSettFundChg.findAll", query="SELECT t FROM TbSettFundChg t")
public class TbSettFundChg implements Serializable {
	private static final long serialVersionUID = 1L;
	
	@Id
	@SequenceGenerator(name="TB_SETT_FUND_CHG_CHGID_GENERATOR", sequenceName="SEQ_SETT_FUND_CHG",allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="TB_SETT_FUND_CHG_CHGID_GENERATOR")
	@Column(name="CHG_ID")
	private long chgId;

	@Column(name="CHG_TOTAL_AMOUNT")
	private double chgTotalAmount;

	@Column(name="CHG_TOTAL_BALANCE")
	private double chgTotalBalance;

	@Column(name="CHG_TOTAL_FREEZE_AMOUNT")
	private double chgTotalFreezeAmount;

	@Column(name="CUST_ACCT_ID")
	private String custAcctId;

	@Column(name="LINK_KEY")
	private long linkKey;

	@Column(name="LINK_TYPE")
	private int linkType;

	@Column(name="SUP_ACCT_ID")
	private String supAcctId;

	@Column(name="THIRD_CUST_ID")
	private String thirdCustId;

	@Column(name="TOTAL_AMOUNT")
	private double totalAmount;

	@Column(name="TOTAL_BALANCE")
	private double totalBalance;

	@Column(name="TOTAL_FREEZE_AMOUNT")
	private double totalFreezeAmount;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="TRANS_DATE")
	private Date transDate;

	public TbSettFundChg() {
	}

	//资金变动情况说明
	public static class LinkType{
		/*
			1：申请支付 ——【1328】接口，FuncFlag=1
			2：冻结 ——【1029】接口，FuncFlag=1
			3：解冻 ——【1029】接口，FuncFlag=2
			4：收费 ——【1030】接口，FuncFlag=1
			5：退费——【1030】接口，FuncFlag=2
			6：会员支付到市场 ——【1031】接口，FuncFlag=1
			7：市场支付到会员 ——【1327】接口，FuncFlag=2
			8：确认支付 ——【1326】接口
			9：可用直接支付 ——【1329】接口，FuncFlag=1
			10：撤销支付——【1328】接口，FuncFlag=2
			11：代理确认支付——【1331】接口，FuncFlag=1
			12：强制支付——【1331】接口，FuncFlag=2
			13：冻结直接支付——【1329】接口，FuncFlag=2
			14：冻结收费——【1030】接口，FuncFlag=3
			15：会员冻结支付到市场——【1031】接口，FuncFlag=3
			16：子账户间可用支付——【1332】接口，FuncFlag=1
			17：子账户间冻结支付——【1332】接口，FuncFlag=2
			20：子账户间划转——【1028】
*/
		
		public static int IN = 100; //入金
		public static int OUT=101; //出金

		public static int PAY=1;//申请支付 导致支付方资金冻结
		public static int FREEZE=2;//冻结
		public static int UNFREEZE=3;//解冻
		
		public static int HANDFEEIN=4;//平台收手续费
		public static int HANDFEEOUT=5;//平台退手续费
		
		public static int SETTIN=6;//会员支付到市场清收账户
		public static int SETTOUT=7;//市场支付到会员
		
		public static int PAYCONFIRM=8;//1326接口 确认支付
		
		public static int PAYCANCEL=10;//交易取消时 取消冻结资金
		
		public static int PAYAGENT=11; //1331接口的代理复核支付
		
		public static int PAYFORCE=12;//1331接口的强制支付
		
		
		public static int HANDFEEFREEZEIN=14;//平台收冻结账户手续费
		
		public static int SETTFREEZEIN=15;//会员冻结支付到市场清收账户
		
		
		
		
		
	}
	
	public long getChgId() {
		return chgId;
	}

	public double getChgTotalAmount() {
		return chgTotalAmount;
	}

	public double getChgTotalBalance() {
		return chgTotalBalance;
	}

	public double getChgTotalFreezeAmount() {
		return chgTotalFreezeAmount;
	}

	public String getCustAcctId() {
		return custAcctId;
	}

	public long getLinkKey() {
		return linkKey;
	}

	public int getLinkType() {
		return linkType;
	}

	public String getSupAcctId() {
		return supAcctId;
	}

	public String getThirdCustId() {
		return thirdCustId;
	}

	public double getTotalAmount() {
		return totalAmount;
	}

	public double getTotalBalance() {
		return totalBalance;
	}

	public double getTotalFreezeAmount() {
		return totalFreezeAmount;
	}

	public Date getTransDate() {
		return transDate;
	}

	public void setChgId(long chgId) {
		this.chgId = chgId;
	}

	public void setChgTotalAmount(double chgTotalAmount) {
		this.chgTotalAmount = chgTotalAmount;
	}

	public void setChgTotalBalance(double chgTotalBalance) {
		this.chgTotalBalance = chgTotalBalance;
	}

	public void setChgTotalFreezeAmount(double chgTotalFreezeAmount) {
		this.chgTotalFreezeAmount = chgTotalFreezeAmount;
	}

	public void setCustAcctId(String custAcctId) {
		this.custAcctId = custAcctId;
	}

	public void setLinkKey(long linkKey) {
		this.linkKey = linkKey;
	}

	public void setLinkType(int linkType) {
		this.linkType = linkType;
	}

	public void setSupAcctId(String supAcctId) {
		this.supAcctId = supAcctId;
	}

	public void setThirdCustId(String thirdCustId) {
		this.thirdCustId = thirdCustId;
	}

	public void setTotalAmount(double totalAmount) {
		this.totalAmount = totalAmount;
	}

	public void setTotalBalance(double totalBalance) {
		this.totalBalance = totalBalance;
	}

	public void setTotalFreezeAmount(double totalFreezeAmount) {
		this.totalFreezeAmount = totalFreezeAmount;
	}

	public void setTransDate(Date transDate) {
		this.transDate = transDate;
	}

}